package com.ruoyi.system.service.vantservice.financialSupport.impl;

import com.ruoyi.system.domain.zhuangxiumain.financialSupport.ProductSuperiority;
import com.ruoyi.system.mapper.vant.financialSupport.ApiProductSuperiorityMapper;
import com.ruoyi.system.service.vantservice.financialSupport.ApiProductSuperiorityService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 惠普 on 2021/1/9 17:39
 */
@Service("/apiProductSuperiorityService")
public class ApiProductSuperiorityServiceImpl implements ApiProductSuperiorityService {
    @Resource
    private ApiProductSuperiorityMapper apiProductSuperiorityMapper;

    /**
     * 查询全部的产品优势
     * @return
     */
    @Override
    public List<ProductSuperiority> selectProductSuperiorityByNull() {
        return apiProductSuperiorityMapper.selectProductSuperiorityByNull();
    }

    /**
     * 添加产品优势
     * @param productSuperiority
     * @return
     */
    @Override
    public int addProductSuperiority(ProductSuperiority productSuperiority) {
        int row = 0;
        row = apiProductSuperiorityMapper.addProductSuperiority(productSuperiority);
        return row;
    }

    /**
     * 修改产品优势
     * @param productSuperiority
     * @return
     */
    @Override
    public int updateProductSuperiority(ProductSuperiority productSuperiority) {
        int row = 0;
        row = apiProductSuperiorityMapper.updateProductSuperiority(productSuperiority);
        return row;
    }

    /**
     * 删除产品优势
     * @param superiorityId
     * @return
     */
    @Override
    public int deleteProductSuperiority(Integer[] superiorityId) {
        int row = 0;
        row = apiProductSuperiorityMapper.deleteProductSuperiority(superiorityId);
        return row;
    }

    @Override
    public List<ProductSuperiority> getProductSuperiorityByState() {
        return apiProductSuperiorityMapper.getProductSuperiorityByState();
    }

}
